<script setup lang="ts">
import lottieJson from '../../assets/json/404-lottie.json'
import useMicroStore from '../../store/micro'

const { isMicro } = useMicroStore()

function toHome() {
  window.location.href = '/'
}
</script>

<template>
  <div class="page">
    <UiLottie
      :animation-data="lottieJson"
      :height="300"
      :width="300"
    />

    <ElButton
      v-if="!isMicro"
      type="primary"
      @click="toHome()"
    >
      回到首页
    </ElButton>
  </div>
</template>

<style lang="less" scoped>
.page {
  inline-size: 100%;
  block-size: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: #fff;
}
</style>
